#ifndef WYZKR688RFSWINSTANCE_H
#define WYZKR688RFSWINSTANCE_H

#include <QWidget>

#include "wyzkr688rfswinstance_global.h"
#include "_Interface/_global_datastruct.h"
#include "_Interface/_interface_backend.h"
#include "_Interface/_interface_hmi.h"

class WYZKR688RFSWINSTANCESHARED_EXPORT WyZkR688RFSWInstance{
private:
    HmiInterface* pHmi = nullptr;
    BackendInterface* pBackend = nullptr;
public:
    WyZkR688RFSWInstance(short Local_Remote);
    ~WyZkR688RFSWInstance();
public:
    QWidget* getUiHandle();
private:
    void RegisiterBackendtoHmi();
public:
    short task_uifast_UiDataUpdate();
    short task_uifast_ForceScopeUpdate();
    short task_uifast_RobotScopeUpdate();

    short task_maininit_toRobotTcpServerAdd();
    short task_maininit_toRobotTcpServerListen();

    void  task_mainloop_toRobotReceiveLoopRun();
    void  task_mainloop_toRobotSendLoopRun();
    void  task_mainloop_ProcessDataSave();
    void  task_mainloop_RfswProcessDeal();

    void  task_com_RemoteDataRecv(QByteArray Data);
    void  task_com_RemoteDataSend(QByteArray& Data);
};

#endif // WYZKR688RFSWINSTANCE_H
